
<?php
session_start();
?>
<body>
    <h1>Welcome <?php echo $_SESSION["AdminEmail"]; ?></h1>

    <?php
    require_once '../dao/DoctorDao.php';
    require_once '../dto/DoctorDto.php';
    require_once '../../phpGrid/conf.php';


    $arrDoctors = DoctorDao::LoadAllDoctor();

    $dg = new C_DataGrid("SELECT * FROM doctor", "email", "doctor");

// change column titles
    $dg->set_col_title("email", "Email");
    $dg->set_col_align('email', 'center');
    $dg->set_col_width("email", 3);

    //
    $dg->set_col_title("first_name", "Name");
    $dg->set_col_width("first_name", 2);
    $dg->set_col_align('first_name', 'center');



// hide a columnb
    $dg->set_col_hidden("last_name");
    $dg->set_col_hidden("password");
// change default caption
    $dg->set_caption("Doctor List");

    $dg->enable_rownumbers(true);

    $dg->add_column(
            'Delete', array('name' => 'delete',
        'width' => '1',
                'align'=>'center',
            ), 'Delete');

    $dg->set_pagesize(10);

    $dg->display();
    ?>

</body>
